package cn.xmkeshe.controller;

import cn.xmkeshe.back.IRecordServiceBack;
import cn.xmkeshe.model.Record;
import cn.xmkeshe.utils.Log;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class RecordController {

  @Resource
  private IRecordServiceBack iStatServiceBack;

//  运输目的地统计
  @RequestMapping("/pages/back/record/destinationPre")
  @Log(operationName = "运输目的地统计页面",operationType = "管理员")
  public String destination(){
    return "/pages/back/record/destination";
  }

  @RequestMapping("/pages/back/record/destination")
  @ResponseBody
  @Log(operationName = "运输目的地统计数据",operationType = "系统")
  public List<Record> find(){
    return iStatServiceBack.find();
  }

//  订单状态统计
  @RequestMapping("/pages/back/record/StatusPre")
  @Log(operationName = "订单状态统计页面",operationType = "管理员")
  public String status(){
    return "/pages/back/record/status";
  }

  @RequestMapping("/pages/back/record/Status")
  @ResponseBody
  @Log(operationName = "订单状态统计数据",operationType = "系统")
  public List<Record> findStatus(){
    return iStatServiceBack.findStatus();
  }


//  司机对账统计
  @RequestMapping("/pages/back/record/aaccountStatusPre")
  @Log(operationName = "司机对账统计页面",operationType = "管理员")
  public String aaccountStatus(){
    return "/pages/back/record/aaccountStatus";
  }

  @RequestMapping("/pages/back/record/aaccountStatus")
  @ResponseBody
  @Log(operationName = "司机对账统计数据",operationType = "系统")
  public List<Record> findAaccountStatus(){
    return iStatServiceBack.aaccountStatus();
  }

  //  客户对账统计
  @RequestMapping("/pages/back/record/caccountStatusPre")
  @Log(operationName = "客户对账统计页面",operationType = "管理员")
  public String caccountStatus(){
    return "/pages/back/record/caccountStatus";
  }

  @RequestMapping("/pages/back/record/caccountStatus")
  @ResponseBody
  @Log(operationName = "客户对账统计数据",operationType = "系统")
  public List<Record> findCaccountStatus(){
    return iStatServiceBack.caccountStatus();
  }
}
